<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>解忧师</title>
</head>
<body>
	<table border="1">
	<tr>
				<td>aid</td>
				<td>解忧师名</td>
				<td>密码</td>
				<td>邮箱</td>
				<td>年龄</td>
				<td>性别</td>
				<td>图片</td>
				<td>类型</td>
				<td colspan="2">操作</td>
	</tr>
		<c:forEach items="${arts}" var="a">
			<tr>
				<td>${a.aid }</td>
				<td>${a.username }</td>
				<td>${a.password }</td>
				<td>${a.email }</td>
				<td>${a.age }</td>
				<td>${a.sex }</td>
				<td><img src="images/${a.listimg}" height="30 px" width="70 px"/></td>
				<td>${a.type }</td>
				<%-- <td><a href="deleteProduct?id=${p.id}" >删除</a></td> --%>
				<td><a href="selectArtById?aid=${a.aid}" >修改</a></td>		
			</tr>

		</c:forEach>
		</table>
		<c:if test="${page.isFirstPage==true }"><a>首页</a></c:if>
	<c:if test="${page.isFirstPage==false }">
	<a href="selectAllArts?pageNum=${page.firstPage }">首页</a>
	</c:if>
	<c:if test="${page.hasPreviousPage==false }"><a>上一页</a></c:if><!-- 如果没有上一页则显示上一页这三个字 -->
	<c:if test="${page.hasPreviousPage==true }">
	<a href="selectAllArts?pageNum=${page.prePage }">上一页</a>
	</c:if> 
	<c:if test="${page.hasNextPage==false }"><a>下一页</a></c:if>
	<c:if test="${page.hasNextPage==true }">
	<a href="selectAllArts?pageNum=${page.nextPage }">下一页</a>
	</c:if> 
	<c:if test="${page.isLastPage==true }"><a>末页</a></c:if>
	<c:if test="${page.isLastPage==false }">
	<a href="selectAllArts?pageNum=${page.lastPage }">末页</a>
	</c:if>     
	
</body>
</html>